using System;
using System.Collections.Generic;
using System.Text;

namespace SJBotScreenAnalyzer.SJBotScreenAlyzer
{
    class SJBotScreenPixel
    {
        private Point pt;
        //
        private SJBotScreenPixel(Point pt)
        {
            this.pt = pt;
        }
        //
        private Color GetColor()
        {
            IntPtr hdcScreen = CreateDC("Display", null, null, IntPtr.Zero);
            int cr = GetPixel(hdcScreen, pt.X, pt.Y);
            DeleteDC(hdcScreen);

            // Convert a Win32 COLORREF to a .NET Color object
            Color clr = Color.FromArgb((cr & 0x000000FF), (cr & 0x0000FF00) >> 8, (cr & 0x00FF0000) >> 16);

            return clr;
        }
    }
}
